import request from '@/utils/request'

export function getUserListByPage(data) {
  return request.get('/user/list', { params: data })
}

export function getAllUser(data) {
  return request.get('/users', data)
}

export function addUser(data) {
  return request.post('/user', data)
}

export function updateUser(data) {
  return request.put('/user', data)
}

export function deleteUser(id) {
  return request.delete('/user/' + id, id)
}

export function getUserById(id) {
  return request.get('/user/' + id)
}

export function getVerificationCode(email){
  console.log(email, 'email')
  return request.get('/getVerificationCode/' + email)
}
